﻿create table dbo.Users (
   UserId               nvarchar(30)         collate Chinese_PRC_CI_AS not null,
   UserName             nvarchar(10)         collate Chinese_PRC_CI_AS null,
   PassWord             nvarchar(50)         collate Chinese_PRC_CI_AS null,
   UserRoleId           nvarchar(10)         collate Chinese_PRC_CI_AS null,
   GroupId              nvarchar(10)         collate Chinese_PRC_CI_AS null,
   UserSettingId        nvarchar(10)         collate Chinese_PRC_CI_AS not null,
   IsEnable             bit                  null,
   LoginsNumber         int                  null,
   CreateBy             nvarchar(10)         collate Chinese_PRC_CI_AS null,
   CreateOn             datetime             null constraint DF_Users_CreateOn default getdate(),
   ModifyBy             nvarchar(10)         collate Chinese_PRC_CI_AS null,
   更新时间                 datetime             null,
   constraint PK_Users primary key (UserId)
         on "PRIMARY"
)
on "PRIMARY"
go

execute sp_addextendedproperty 'MS_Description', 
   '用户编号',
   'user', 'dbo', 'table', 'Users', 'column', 'UserId'
go

execute sp_addextendedproperty 'MS_Description', 
   '用户名',
   'user', 'dbo', 'table', 'Users', 'column', 'UserName'
go

execute sp_addextendedproperty 'MS_Description', 
   '密码',
   'user', 'dbo', 'table', 'Users', 'column', 'PassWord'
go

execute sp_addextendedproperty 'MS_Description', 
   '角色编号[Id]',
   'user', 'dbo', 'table', 'Users', 'column', 'UserRoleId'
go

execute sp_addextendedproperty 'MS_Description', 
   '机构编号[Id]',
   'user', 'dbo', 'table', 'Users', 'column', 'GroupId'
go

execute sp_addextendedproperty 'MS_Description', 
   '用户设置ID',
   'user', 'dbo', 'table', 'Users', 'column', 'UserSettingId'
go

execute sp_addextendedproperty 'MS_Description', 
   '是否启用',
   'user', 'dbo', 'table', 'Users', 'column', 'IsEnable'
go

execute sp_addextendedproperty 'MS_Description', 
   '登录次数',
   'user', 'dbo', 'table', 'Users', 'column', 'LoginsNumber'
go

execute sp_addextendedproperty 'MS_Description', 
   '创建人',
   'user', 'dbo', 'table', 'Users', 'column', 'CreateBy'
go

execute sp_addextendedproperty 'MS_Description', 
   '创建时间',
   'user', 'dbo', 'table', 'Users', 'column', 'CreateOn'
go

execute sp_addextendedproperty 'MS_Description', 
   '更改人',
   'user', 'dbo', 'table', 'Users', 'column', 'ModifyBy'
go

execute sp_addextendedproperty 'MS_Description', 
   '更改时间',
   'user', 'dbo', 'table', 'Users', 'column', '更新时间'
go
